package com.qidian.mes.sys.controller;

import com.qidian.mes.sys.service.UserService;
import com.qidianit.mes.common.pojo.MesResult;
import com.qidianit.mes.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 戴着假发的程序员
 * @company 起点编程
 * @date 2025/8/7 10:03
 * @description
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/{userId}")
    public MesResult<User>   getUserById(Integer userId) {
        return MesResult.success(userService.getById(userId));
    }
}
